1. Field of the Invention
This invention generally relates to automatic code-generation systems and methods for creating transform documents. More specifically, this invention relates to a software wizard (i.e. a structured, graphical user interface) that guides users wanting to generate extensible stylesheet language (“XSL”) transformation documents.
2. Description of the Related Art
The World Wide Web Consortium (“W3C”) has created several international industry standards designed to facilitate the transfer of information between software applications, including those applications running in different operating systems on different computers. One of these standards is the extensible markup language (“XML”).
XML documents are text documents, with embedded data tags to label and structure the data. The data tags may be of three types: an opening tag, a closing tag, or a composite tag. (A composite tag is simply abbreviated form of an opening tag immediately followed by a closing tag, and will not be discussed further.) The opening and closing tags define the boundaries of data elements in XML documents. Each opening tag must have a corresponding closing tag. Data elements can be nested, but they cannot otherwise overlap.
Data elements include the opening and closing tags and any values (“element values”) or elements (hereafter termed “sub-elements” or “nested elements”) enclosed by the opening and closing tags. In addition to defining the boundaries of the data element, the tags also specify the name of the data element (“element name”). Further, the opening tag may specify the name and values of one or more attributes for the data element (“attribute name” and “attribute value”, respectively). The term “entities” is hereafter used to refer to elements and attributes collectively, so the term “entity name” could refer to the name of either an element or an attribute.
XML files can be mapped to a tree data structure, with nested elements being children of the elements in which they nest. Further details regarding XML can be found in C. Ashbacher, Sams Teach Yourself XML in 24 Hours, Sams Publishing: Indianapolis, ©2000, which is hereby fully incorporated herein by reference.
A primary advantage of XML is extensibility. That is, the tags are user-defined. One consequent advantage of this is human readability. The tags generally indicate the meaning of the elements they enclose, so it is easy for a reader to identify the data. This makes it much easier for programmers to extract desired data values from an XML file. Another advantage is that creating XML files takes only slightly more effort than creating normal text files.
Once W3C created the standard data language XML, they proceeded to create a standard transformation language for processing it, and called it the extensible stylesheet language (“XSL”). The XSL standard was originally intended as a way to specify a presentation format (page layout, font size, etc.) for data in XML documents. However, XSL specification includes another W3C specification called XPath, which in turn provides a transform engine called XSL-Transform, or “XSLT”. XSLT is used to convert XML documents into other forms, such as other XML documents, hyper-text markup language (“HTML”) documents, rich text format (“RTF”) documents, portable data format (“PDF”) documents, and plain-text documents. Further details regarding XSLT can be found in S. Holzner, Inside XSLT, New Riders:Boston, ©2001, which is hereby fully incorporated herein by reference.
FIG. 1 shows how the transformation process works. A transform engine (XSLT) 102 takes an input document (XML) 104, and applies a transformation document (XSL) 106 to it to produce an output document 108. A number of suitable XSLT engines 102 are readily available online, e.g., MSXSL, 4XSLT, EZ/X, iXSLT, LotusXSL, MDC-XSL, Sablotron, SAXON, Transformiix, UXT, Xalan-C++, Xalan Java, xesalt, Xport, XSL:P, and XT. The input document 104 is preferably a well-formed XML document. The transformation document 106 is an XSL document, which means that it is also a well-formed XML document. Generally, the transformation is conducted by a user invoking the transformation engine 102, and providing the names of the input document 104 and the transformation document 106.
The transformation process shown in FIG. 1 may be likened to the operation of a programming language interpreter. The user provides the interpreter (the transformation engine) with a program (the transformation document) and some program input (the input document). The interpreter follows the instructions in the program to process the program input and to produce a program output (the output document). As with any programming language, transformation document authors must learn and use the XSLT vocabulary and syntax, and must employ logic and discipline to write a successful transformation document. Consequently, the authoring of XSL transformation documents is typically left to experienced XSL programmers.
However, because XML is powerful, human readable, and can be easily understood and employed, there exists a wide audience of people that employ XML and that wish to employ XSLT. Unfortunately, many of these people lack knowledge of XSL or lack the time to author their own XSL transformation documents. A need exists for a way to enable programmers familiar with XML but less fluent in XSL to generate XSL documents easily and rapidly. Even experienced XSL programmers would benefit from a tool that automates the transformation document authoring process, as such a tool would create standardized XSL code that is compliant with a wide range of XSLT engines and that increases consistency, maintainability, and reusability of the transformation documents.